package cn.biplam.setup.code.product;

import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.Result;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.callback.CallBack;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.base.Text;
import cn.biplam.setup.code.product.ProductData.ProductStaus;

/**
 * 
 * @author XiaoRuxing Sep 29, 200910:39:54 AM
 * @version 1.0
 */
public class ProductStatuCallback implements CallBack{

	public HtmlWindow[] getGroup(Result data, String homeUrl, UserInfo mUser)
	throws ErrorMessage {
		/** 创建按钮 */
		HtmlWindow[] opetator=new HtmlWindow[1];
		String status = data.getString(ProductData.SERVICE_FLG);
		String flg = null;
		if(ProductStaus.Start.equals(status)){
			flg = "发布";
		}else if(ProductStaus.Stop.equals(status)){
			flg = "停用";
		}
		opetator[0] = new Text(flg).get();
		return opetator;
	}
}
